/* --- SECTION 5: Events & Footer --- */
html, body {
    height: 100%;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* toàn trang cao 100% viewport */
}
#section5 {
    flex-grow: 1;
    flex: 1 0 auto;
    padding: 4rem 0 0 0;
    background-image: radial-gradient(var(--border-color) 1px, transparent 0);
    background-size: 20px 20px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Theme */
body.light-theme #section5,
body.light-theme #section5 * {
    --bg-color: #fff !important;
    --text-color: #222 !important;
    --border-color: #ccc !important;
    background-color: var(--bg-color) !important;
    color: var(--text-color) !important;
}

body.dark-theme #section5,
body.dark-theme #section5 * {
    --bg-color: #1e1e1e !important;
    --text-color: #eee !important;
    --border-color: #555 !important;
    background-color: var(--bg-color) !important;
    color: var(--text-color) !important;
}

/* Carousel */
.event-carousel-wrapper {
    display: flex;
    justify-content: center;
    overflow: hidden;
    padding: 1rem 0;
}

.event-carousel {
    display: flex;
    gap: 1.5rem;
    flex-wrap: nowrap;
}

.event-card {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    width: 280px;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.event-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.event-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    padding: 10px;
}

.event-card:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.event-card:hover .event-info {
    opacity: 1;
    transform: translateY(0);
}

/* Footer */
.site-footer {
    display: flex;
    justify-content: space-between;
    /* Trái/Phải */
    align-items: flex-start;
    padding: 40px 60px;
    background: var(--bg-color);
    color: var(--text-color);
    width: 100%;
    box-sizing: border-box;
    flex-shrink: 0;
}

/* Bên trái: lib, copyright, icons, tagline */
.footer-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.footer-logo {
    font-size: 55px;
    font-weight: bold;
    color: var(--logo-color, #000);
}

.footer-social-icons a {
    font-size: 18px;
    margin-right: 15px;
    color: var(--icon-color, #000);
    transition: color 0.3s ease;
}

.footer-social-icons a:hover {
    opacity: 0.7;
}

.footer-tagline {
    font-size: 28px;
    font-weight: bold;
    margin-top: 10px;
}

/* Bên phải: các cột link */
.footer-right {
    display: flex;
    gap: 80px;
}

.footer-column h4 {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 10px;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column ul li a {
    display: block;
    font-size: 14px;
    text-decoration: none;
    color: var(--text-color);
    line-height: 2;
}

.footer-column ul li a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 991px) {
    .site-footer {
        flex-direction: column;
        align-items: flex-start;
        padding: 30px 20px;
    }

    .footer-right {
        flex-direction: column;
        gap: 20px;
        margin-top: 20px;
    }

    .footer-left {
        align-items: center;
        text-align: center;
        margin-bottom: 20px;
    }

    .footer-identity {
        flex-direction: column;
        align-items: center;
    }

    .footer-logo {
        padding-right: 0;
        margin-bottom: 5px;
    }

    #section5 .event-carousel-wrapper {
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    #section5 .event-card {
        scroll-snap-align: start;
    }
}